import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path:'/login',
      component:()=>import('@/views/login/index')

    },
    {
      path: '/',
      component: () => import('../views/layout/index') ,
      redirect:'/home',
      children: [
        {
          path: '/home',
          component: ()=>import('@/views/home/index')
        },
        {
          path: '/article',
          component: ()=>import('@/views/article/index')
        },
        {
          path:'newsDetail',
          component: ()=>import('@/views/article/detail.vue')
        },
        {
          path:'university',
          component: ()=>import('@/views/university/index')
        },
        {
          path:'universityDetail',
          component: ()=>import('@/views/university/detail.vue')
        },
        {
          path:'major',
          component: ()=>import('@/views/major/index.vue')
        },
        {
          path:'majorDetail',
          component: ()=>import('@/views/major/detail.vue')
        },
        {
          path:'scores',
          component: ()=>import('@/views/scores/index.vue')
        },
        {
          path:'recommend',
          component: ()=>import('../views/recommend/index')
        },
        {
          path:'/personal',
          component: () => import('../views/personal/index.vue') ,
          children: [
            {
              path: '/basicInfo',
              component: ()=>import('../views/personal/basicInfo.vue')
            },
            {
              path: '/favorite',
              component: ()=>import('../views/personal/myFavorite.vue')
            }
          ]
        },
    
       
      

        // 其他路由配置
      ]
    },{
      path:'/404',
      name:'404',
      component:()=>import('@/views/404.vue')
    },
    /* {
      path:'*',redirect:'/404'
    } */
    
  ]
});